package com.seven.loginencrypt.controller;
import com.seven.loginencrypt.utils.RSAUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;


/**
 * 首页数据获取,获取公钥
 */
@RestController
public class index {

    @RequestMapping("/index")
    public String index(HttpServletRequest httpServletRequest) {
        try {
            String publickey = RSAUtils.generateBase64PublicKey();
            return publickey;
        } catch (Exception e) {
            return "";
        }
    }
}
